package com.woyou.utils.eventbus;

/**
 * fm 关闭事件
 * 
 * @author longtao.li
 * 
 * @param <T>
 */
public class EventCloseFM<T, E> implements IEvent<T> {

	private T fmTag;
	
	/**
	 * 要携带的数据
	 */
	private E bean; 
	
	/**
	 * 是否销毁当前Fm
	 */
	private boolean isDestory; 
	
	/**
	 * 是否销毁当前层级的所有Fragment
	 */
	private boolean isDestoryAll;
	
	public boolean isDestoryAll() {
		return isDestoryAll;
	}
	
	public void setDestoryAll(boolean isDestroyAll) {
		this.isDestoryAll = isDestroyAll;
	}

	public boolean isDestory() {
		return isDestory;
	}

	public void setDestory(boolean isDestroy) {
		this.isDestory = isDestroy;
	}
	
	public EventCloseFM(T tag) {
		this.fmTag = tag;
	}

	public EventCloseFM(T tag, E bean) {
		this.fmTag = tag;
		this.bean = bean;
	}

	@Override
	public int getId() {
		return 0;
	}

	@Override
	public void setId(int id) {

	}

	@Override
	public T getData() {
		return fmTag;
	}
	
	public E getBean() {
		return bean;
	}

}
